package com.sale.system.service;


import com.sale.common.mybatis.core.page.PageQuery;
import com.sale.common.mybatis.core.page.TableDataInfo;
import com.sale.system.api.domain.dto.SysCustomerBalance;
import com.sale.system.api.domain.dto.SysApiOrderSupplierManagementDto;
import com.sale.system.domain.PullDown;
import com.sale.system.domain.dto.SysOrderSupplierManagementDto;
import com.sale.system.domain.vo.OrderReviewVo;
import com.sale.system.domain.vo.SysOrderSupplierManagementVo;
import com.sale.system.export.OrderSupplierManagementExport;
import com.sale.system.export.OrderSupplierManagementimportExport;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 供应商service
 */
public interface SysOrderSupplierManagementService {

    /**
     * 查询供应商列表
     */
    TableDataInfo<SysApiOrderSupplierManagementDto> getList(SysOrderSupplierManagementVo sysOrderSupplierManagementVo, PageQuery pageQuery);

    /**
     * 新增供应商
     */
    boolean addSupplier(SysOrderSupplierManagementVo sysOrderSupplierManagementVo) throws Exception;

    /**
     * 冻结供应商
     */
    boolean frozenSupplier(Long id);

    /**
     * 解冻供应商
     */
    boolean thawSupplier(Long id);

    /**
     * 撤销审核
     */
    boolean revokeApproval(Long id);

    /**
     * 供应商信息导出
     */
    List<OrderSupplierManagementExport> getInfoExport(SysOrderSupplierManagementVo sysOrderSupplierManagementVo);

    /**
     * 供应商导入
     */
    String importMouldData(List<OrderSupplierManagementimportExport> coCustomer);

    /**
     * 供应商删除
     */
    boolean deleteSupplierByIds(String ids) throws Exception;

    /**
     * 查看供应商信息
     */
    SysApiOrderSupplierManagementDto getSupplierById(Long id);



    /**
     * 根据供应商编码查询供应商详情信息
     */
    SysApiOrderSupplierManagementDto getSupplierByNum(String supplierNum);


    /**
     * 提交审核
     */
    boolean reivewSubmit(Long id);

    /**
     * 修改供应商
     */
    boolean updateSupplierById(SysOrderSupplierManagementVo sysOrderSupplierManagementVo) throws Exception;

    /**
     * 供应商审核
     */
    boolean supplierReview(OrderReviewVo orderReviewVo) throws Exception;

    /**
     * 供应商启用状态修改
     */
    boolean updateStatus(SysOrderSupplierManagementVo sysOrderSupplierManagementVo);

    /**
     * 获取启用的供应商列表
     */
    List<HashMap<String,String>> getOpenSupplier();

    /**
     * 获取启用的供应商列表(财务模块调用)
     * @return
     */
    Map<String,String> getOpenSupplierFinance();

    /**
     * 根据编码获取供应商信息
     */
    SysApiOrderSupplierManagementDto getSupplierByCode(String code);

    /**
     * 通过供应商名称获取供应商编码(财务模块使用)
     */
    String getCodeBySupplierName(String supplierName);

    /**
     * 供应商下拉
     */
    List<PullDown> supplierPullDown();

    /**
     * 更新供应商余额(财务模块使用)
     */
    boolean updateSupplierBalance(SysCustomerBalance customer);
}
